<ng-container *ngIf="currentPage===pageTypeEnum.List">
  <app-page-header [pageHeaderInfo]="pageHeaderInfo"></app-page-header>
  <div class="normal-table-wrap">
    <nz-card [nzBodyStyle]="{'padding-bottom':0}" class="m-b-10">
      <form nz-form>
        <div nz-row [nzGutter]="{ xs: 8, sm: 16, md: 24}" [nzJustify]="'space-between'">
          <div nz-col [nzXXl]="8" [nzXl]="8" [nzLg]="8" [nzMd]="12" nzSm="24" nzXs="24">
            <nz-form-item>
              <nz-form-label [nzFor]="">考试名</nz-form-label>
              <nz-form-control>
                <input nz-input name="name" [(ngModel)]="searchParam.name" placeholder="请输入考试名"/>
              </nz-form-control>
            </nz-form-item>
          </div>
          <div nz-col [nzXXl]="8" [nzXl]="8" [nzLg]="8" [nzMd]="12" nzSm="24" nzXs="24">
            <nz-form-item>
              <nz-form-label [nzFor]="">创建时间</nz-form-label>
              <nz-form-control>
                <nz-range-picker name="createTime" [(ngModel)]="searchParam.createTime"
                                 (ngModelChange)="changeCreateTime($event)"
                                 [nzShowTime]="true"></nz-range-picker>
              </nz-form-control>
            </nz-form-item>
          </div>
          <div nz-col [nzXXl]="8" [nzXl]="8" [nzLg]="8" [nzMd]="12" nzSm="24" nzXs="24" class="text-right">
            <button nz-button [nzType]="'primary'" (click)="getDataList()"><i nz-icon nzType="search"></i>搜索</button>
            <button nz-button class="m-l-15" (click)="resetForm()"><i nz-icon nzType="close-circle"
                                                                      nzTheme="outline"></i>重置
            </button>
          </div>
        </div>
      </form>
    </nz-card>
    <app-card-table-wrap [actionCode]="actionCodeObj" [needAddBtn]="true" [needDelBtn]="true" (add)="add()"
                         (del)="allDel()">
      <app-ant-table (selectedChange)="selectedChecked($event)" [checkedCashArrayFromComment]="checkedCashArray"
                     (changePageSize)="changePageSize($event)" (changePageNum)="getDataList($event)"
                     [tableConfig]="tableConfig" [tableData]="dataList"></app-ant-table>
    </app-card-table-wrap>
  </div>
</ng-container>
<ng-container *ngIf="currentPage===pageTypeEnum.AddOrEdit">
  <app-add-edit-exams [currentPageNum]="tableConfig.pageIndex" [id]="questionTestId"
                      (returnBack)="returnToList($event)"></app-add-edit-exams>
</ng-container>
<ng-container *ngIf="currentPage===pageTypeEnum.DetailOrExamine">
  <app-detail-exams [id]="questionTestId" (returnBack)="returnToList($event)"
                    [currentPageNum]="tableConfig.pageIndex"></app-detail-exams>
</ng-container>
<ng-template #operationTpl let-id="id">
  <span *appAuth="ActionCode.ExamManageEdit" class="operate-text" (click)="edit(id)"><i nz-icon nzType="edit"
                                                                                        nzTheme="fill"></i>编辑</span>
  <span *appAuth="ActionCode.ExamManageDel" class="operate-text" (click)="del(id)"><i nz-icon nzType="delete"
                                                                                      nzTheme="fill"></i>删除</span>
  <span *appAuth="ActionCode.ExamManageDetail" class="operate-text" (click)="detail(id)"><i nz-icon
                                                                                            nzType="right-circle"
                                                                                            nzTheme="twotone"></i>考试人员</span>
</ng-template>
